package com.itheima.arraylist;

import java.lang.reflect.Array;
import java.util.ArrayList;

public class Demo1 {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList=new ArrayList<>();
        arrayList.add(1);
        arrayList.add(0);
       //arrayList.add(1,"贾玲");
        System.out.println(arrayList);
        //删
        //arrayList.remove("柳岩");//通过元素删除
        arrayList.remove(0);//通过索引删除
        System.out.println(arrayList);
        //查
        //arrayList.get(0);
        //改
       // arrayList.set(0,"liuyan");
       // System.out.println(arrayList);

    }
}
